package com.luhuiguo.cms.shared.event;

import com.google.gwt.event.shared.GwtEvent;
import com.luhuiguo.cms.shared.model.ChannelModel;
import com.luhuiguo.cms.shared.model.UserModel;

public class LoadArticlesEvent extends GwtEvent<LoadArticlesEventHandler> {

    public static Type<LoadArticlesEventHandler> TYPE = new Type<LoadArticlesEventHandler>();

    private final Long channel;

    public LoadArticlesEvent(Long channel) {
        super();
        this.channel = channel;

    }

    public Long getChannel() {
        return channel;
    }

    @Override
    protected void dispatch(LoadArticlesEventHandler handler) {
        handler.onLoadArticles(this);
    }

    @Override
    public Type<LoadArticlesEventHandler> getAssociatedType() {
        return TYPE;
    }

}
